package com.katze.common.http;

import org.lionsoul.ip2region.xdb.Searcher;

import java.io.IOException;

public class IPSearcher extends Searcher implements AutoCloseable{

    public IPSearcher(String dbFile, byte[] vectorIndex, byte[] cBuff) throws IOException {
        super(dbFile, vectorIndex, cBuff);
    }

    public static IPSearcher build(String dbPath) throws IOException {
        return new IPSearcher(dbPath, null, null);
    }

    public static IPSearcher build(byte[] cBuff) throws IOException {
        return new IPSearcher(null, null, cBuff);
    }
}
